<ion-header>
    <ion-navbar color="orange">
        <ion-title>
            编辑{{type_name}}信息
        </ion-title>
        <!--<ion-buttons end>-->
            <!--<button ion-button icon-only>-->
                <!--确认-->
            <!--</button>-->
        <!--</ion-buttons>-->
    </ion-navbar>
</ion-header>

<ion-content>
    <div class="ht-f1f1f1 ht-overflow">
        <!-- 模块1开始 -->
        <div class="ht-overflow ht-background ht-margin-bottom" padding-left padding-right>
            <!-- 单选按钮开始 -->
            <div class="ht-100 ht-overflow ht-padding-tb flex flex-align-center">
                <div class="" radio-group>
                    <label class="flex flex-align-center">
                        <!--<ion-radio value="1" style="border:1px solid #ccc;width:20px;height:20px;border-radius: 50%;color:#000;"></ion-radio>-->
                        <input type="radio" [value]="1" [(ngModel)]="sendData.role">
                        <span class="margin-left-5">自发信息</span>
                    </label>
                </div>
                <div class="" margin-left>
                    <label class="flex flex-align-center">
                        <input type="radio" [value]="2" [(ngModel)]="sendData.role">
                        <span class="margin-left-5">代发信息</span>
                    </label>
                </div>
            </div>
            <div class="ht-100 ht-overflow ht-padding-bottom10 ht-font-f29603 ht-font-14">
                点击下面的选项自动生成信息：
            </div>
        </div>
        <!-- 模块1结束 -->
        <!-- 模块2开始 -->
        <div class="ht-overflow ht-background ht-margin-bottom ht-padding-top10" padding-left padding-right
             *ngFor="let group of options">
            <!-- 工种 -->
            <div class="ht-100 ht-overflow ht-font-13 flex" *ngFor="let item of group">
                <div class="ht-999 ht-line-25 nowrap">
                    {{item.option_name}}：
                </div>
                <!--0文本框-->
                <div class="" *ngIf="item.option_type === 0">
                    <div class="ht-100 ht-overflow ht-padding-bottom10">
                        <input type="text" class="ie-input" placeholder="{{item.option_holder}}"
                               [(ngModel)]="infoData[item.letter]" (blur)="textData(item)">
                    </div>
                </div>
                <!--2单选-->
                <div class="ht-padding-bottom10" *ngIf="item.option_type === 2">
                    <div class="ht-100 ht-overflow ht-padding-bottom10">
                        <label class="ie-bs" [ngClass]="{'ie-xiaoguo':option.list_name == infoData[item.letter]}"
                               *ngFor="let option of item.option_list">
                            <input type="radio" value="{{option.list_name}}" [(ngModel)]="infoData[item.letter]" hidden
                                   (click)="selRadioData(item,option)">
                            {{option.list_name}}
                        </label>
                        <!--<input type="text" class="ie-input" placeholder="{{item.option_holder}}" [(ngModel)]="this.infoTextData[item.letter]" (blur)="textData(item)">-->
                    </div>
                </div>
                <!--3多选-->
                <div class="ht-padding-bottom10" *ngIf="item.option_type === 3">
                    <div class="ht-100 ht-overflow ht-padding-bottom10">
                        <label class="ie-bs"
                               [ngClass]="{'ie-xiaoguo':util.inArray(infoData[item.letter],option.list_name) > -1}"
                               *ngFor="let option of item.option_list" (click)="selCheckData(item,option)">
                            <!--<input type="checkbox" [value]="option.list_name" [(ngModel)]="option['checked']">-->
                            {{option.list_name}}
                        </label>
                        <!--<input type="text" class="ie-input" placeholder="{{item.option_holder}}" [(ngModel)]="infoTextData[item.letter]" (focus)="checkFocusData(item)" (blur)="checkBlurData(item)">-->
                    </div>
                </div>
                <!--1文本域-->
                <div class="ht-padding-bottom10 flex-1" *ngIf="item.option_type === 1">
                    <textarea rows="3" placeholder="{{item.option_holder}}" style="width:100%;"
                              [(ngModel)]="infoData[item.letter]" (blur)="textData(item)"></textarea>
                </div>
                <!--4 时间-->
                <!--5文件上传-->
                <div class="ht-padding-bottom10 flex flex-wrap" *ngIf="item.option_type === 5">
                    <div class="ie-img margin-left-5 margin-bottom-5 ht-relative"
                         *ngFor="let image of infoData[item.letter]">
                        <img [src]="config.imageUrl+image">
                        <span class="del-image" (click)="delImage(item,image)">删除</span>
                    </div>
                    <div class="ie-img margin-left-5 margin-bottom-5"
                         *ngIf="infoData[item.letter] == undefined || (infoData[item.letter] && infoData[item.letter].length < 3)">
                        <input type="file" class="file-input" (change)="uploadImage(item,$event)">
                    </div>
                </div>
                <!--6 时间范围-->
                <div class="ht-100" style="height:30px;background:#f8f8f8;margin-bottom:15px;padding-left:10px;padding-top:3px;" *ngIf="item.option_type === 6">
                    <div class="flex-1 ht-100 ht-overflow ht-relative padding-top-5 ht-font-14">
                        <ion-datetime style="line-height:35px;" (ionChange)="selDate(item, $event)" [(ngModel)]="infoData[item.letter]" placeholder="{{item.option_holder}}" no-padding displayFormat="YYYY年MM月DD日" doneText="完成" cancelText="取消"></ion-datetime>
                    </div>
                </div>
            </div>
        </div>
        <!-- 模块2结束 -->
        <!-- 自动编写信息内容开始 -->
        <div class="ht-100 ht-background ht-overflow ht-margin-bottom" padding-left padding-right padding-bottom>
      <span class="ht-100 ht-inline-block ht-line-45 ht-font-14 ht-999">
        自动编写信息内容（发布人核对）
      </span>
            <div class="ht-100 ht-overflow">
                <textarea rows="6" placeholder="备注" [(ngModel)]="auto_content"></textarea>
            </div>
        </div>
        <!-- 自动编写信息内容结束 -->
        <!-- 选择发布开始 -->
        <!--<div class="ht-100 ht-background ht-overflow" padding>-->
        <!--<span class="ht-100 ht-inline-block ht-line-20 ht-font-14 ht-font-f29603 ht-padding-bottom10">-->
        <!--选择发布（可不选、可多选）-->
        <!--</span>-->
        <!--<div class="ht-padding-bottom10">-->
        <!--<label class="ht-000">-->
        <!--<input type="checkbox" value="1" [(ngModel)]="sendData.click_pay" [disabled]="editStatus.reward"> 设置点击付费-->
        <!--<i class="ht-999 ht-font-12 ht-block">（信息被转发后，按点击量付费，付费总额封顶）</i>-->
        <!--</label>-->
        <!--</div>-->
        <!--<div class="ht-padding-bottom10">-->
        <!--<label class="ht-000">-->
        <!--<input type="checkbox" value="1" [(ngModel)]="sendData.see_pay" [disabled]="editStatus.reward"> 设置付费查看-->
        <!--<i class="ht-999 ht-font-12 ht-block">（信息收费，付费后查看联系方式，收费期限最长三个月）</i>-->
        <!--</label>-->
        <!--</div>-->
        <!--&lt;!&ndash;<div class="ht-padding-bottom10">&ndash;&gt;-->
        <!--&lt;!&ndash;<label class="ht-000">&ndash;&gt;-->
        <!--&lt;!&ndash;<input type="checkbox" value="1" [(ngModel)]="sendData.cash_deposit" [disabled]="editStatus.reward"> 设置保证金&ndash;&gt;-->
        <!--&lt;!&ndash;<i class="ht-999 ht-font-12 ht-block">（例如：顶岗保证金）</i>&ndash;&gt;-->
        <!--&lt;!&ndash;</label>&ndash;&gt;-->
        <!--&lt;!&ndash;</div>&ndash;&gt;-->
        <!--<div class="ht-padding-bottom10">-->
        <!--<label class="ht-000">-->
        <!--<input type="checkbox" value="1" [(ngModel)]="sendData.reward" [disabled]="editStatus.reward"> 设置悬赏-->
        <!--</label>-->
        <!--</div>-->
        <!--</div>-->
        <!-- 选择发布结束 -->
    </div>
</ion-content>
<ion-footer>
    <ion-toolbar>
        <!--<div class="ht-50 ht-float-left ht-line-50 ht-text-center" (click)="resetData()">重置</div>-->
        <div class="ht-100 ht-float-left ht-line-50 ht-text-center ht-fff ht-f29603" (click)="submitData()">确认</div>
    </ion-toolbar>
</ion-footer>
